import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import installElementPlus from './plugins/element'
import * as echarts from 'echarts'

const app = createApp(App)
installElementPlus(app)
app.echarts=echarts
app.use(store).use(router).mount('#app')


// app.config.globalProperties.$http = () => {}  ====配置全局变量的方法
import { 
    formatDate, 
    trim, 
    link, 
    imgBg, 
    setItem, 
    getItem, 
    remItem,
    get,
    post 
} from './utils/com';

app.config.globalProperties.$formatDate = formatDate;
app.config.globalProperties.$trim = trim;
app.config.globalProperties.$link = link;
app.config.globalProperties.imgBg = imgBg;
app.config.globalProperties.$setItem = setItem;
app.config.globalProperties.$getItem = getItem;
app.config.globalProperties.$remItem = remItem;
app.config.globalProperties.$get = get;
app.config.globalProperties.$post = post;


// echarts
app.config.globalProperties.$echarts = echarts